//
//  MBAMemcachedCache.swift
//  chat
//
//  Created by 1 on 2023/6/6.
//  仅内存缓存（字典实现）

struct MBAMemcachedCache {
    private static var cacheDictionary = [String: Any]()
    
    static func set(object: Any, forKey key: String) {
        cacheDictionary[key] = object
    }
    
    static func object(forKey key: String) -> Any? {
        return cacheDictionary[key]
    }
    
    static func removeObject(forKey key: String) {
        cacheDictionary.removeValue(forKey: key)
    }
    
    static func removeAllObjects() {
        cacheDictionary.removeAll()
    }
}
